while(i<=ncol(beta))
{
beta[,2]<-as.numeric(beta[,2])
i<-i+1
}
[1] 27578  2662
i<-2
while(i<=ncol(beta))
{
beta[,i]<-as.numeric(beta[,i])
i<-i+1
}
i<-2
while(i<=ncol(beta))
{
print(i)
beta[,i]<-as.numeric(beta[,i])
i<-i+1
}
beta<-read.table("merged_beta.txt",sep="\t",head=T)
beta1<-as.numeric(levels(beta)[beta]) 
summary(beta1[,2])
dim(beta1)
beta<-read.table("merged_beta.txt",sep="\t",head=T,stringsAsFactors =FALSE)
i<-1
pdf("test_boxplot.pdf")
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
beta1<-as.numeric(beta[min:temp1])
beta1<-beta[min:temp1]
beta1<-as.numeric(beta1)
beta1<-as.numeric(levels(beta1)[beta1])
colnames(beta1)
summary(beta[,1))
summary(beta[,1])
summary(beta1[,1])
beta[1,1:5]
i<-2
while(i<=ncol(beta))
{
beta[,i]<-as.numeric(beta[,i])
i<-i+1
}
max(beta[2:30])
dev.off()
pdf("test_boxplot.pdf")
i<-1
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
if(max(beta[z]) > 1)
{
print(z)
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
dev.off()
pdf("test_boxplot.pdf")
i<-1
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
if(max(beta[z]) > 1)
{
print(z)
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print("min",min,sep=" ")
print("max",max,sep=" ")
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
if(max(beta[z]) > 1)
{
print(z)
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
i<-i+1
}
dev.off()
min
dev.off()
pdf("test_boxplot.pdf")
i<-1
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
if(max(beta[z]) > 1)
{
print(z)
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
if(max(beta[z]) > 1)
{
print(z)
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
i<-i+1
}
dev.off()
pdf("test_boxplot.pdf")
i<-1
min<-152
max<-347
main<-names[i]
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
max(beta[z])
z<-min
while(z<=temp1)
{
print(z)
if(max(beta[z]) > 1)
{
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
temp1
summary(beta[,192])
z
beta[,z]<-as.numeric(beta[,z])
summary(beta[,193])
max(beta[193:200])
max(beta[193:202])
max(beta[,202])
max(beta[,201])
max(beta[,200])
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
print(z)
if(max(beta[,z]) > 1)
{
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
i<-i+1
}
dev.off()
z
summary(beta[, z])
max(beta[, z])
is.numeric(beta[,205])
is.numeric(beta[,192])
is.numeric(beta[,1])
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
print(z)
#if(max(beta[,z]) > 1)
if(is.numeric(beta[,z]))
{
beta[,z]<-as.numeric(beta[,z])
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
i<-i+1
}
which(!is.nueric(beta))
which(!is.numeric(beta))
a<-c(1,2,NA)
max(a)
if(max(a)==NA){a<-is.numeric(a)}
is.numeric(a)
ls()
beta<-read.table("merged_beta.txt",sep="\t",head=T,colClasses=colClasses)
beta<-read.table("merged_beta1.txt",sep="\t",head=T,colClasses=colClasses)
beta<-read.table("merged_beta1.txt",sep="\t",head=T,colClasses=colClasses)
beta<-read.table("merged_beta1.txt",sep="\t",head=T)
beta<-read.table("merged_beta.txt",sep="\t",head=T)
summary(beta[,2])
summary(beta[,192])
max(beta[,2])
max(beta[,192])
dev.off()
is.numeric(beta[,192])
is.numeric(beta[,191])
summary(as.numeric(beta[,192]))
summary(as.numeric(levels(data[,192])[data[,192]]) )
a<-data[,192]
summary(as.character(data[,192]))
dim(data)
summary(as.character(beta[,192]))
summary(as.numeric(as.character(beta[,192])))
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
z<-min
while(z<=temp1)
{
print(z)
#if(max(beta[,z]) > 1)
if(is.numeric(beta[,z]))
{
beta[,z]<-as.numeric(as.character(beta[,z]))
}
z<-z+1
}
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
i<-i+1
}
is.numeric(beta)
dim(beta)
is.numeric(beta[,2:2662)
is.numeric(beta[,2:2662])
beta[,2:2662]<-as.numeric(as.character(beta[,2:2662]))
summary(beta[,192])
summary(beta[,191])
beta<-read.table("merged_beta1.txt",sep="\t",head=T)
beta<-read.table("merged_beta.txt",sep="\t",head=T)
beta<-read.table("merged_beta.txt",sep="\t",head=T,na.strings=c('-'),as.is=T)
beta<-read.table("merged_beta.txt",sep="\t",head=T,na.strings=c('-'),colClasses=colClasses)
summary(beta[,192])
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
boxplot(beta[min:temp1],horizontal=TRUE,show.names = TRUE,main=main)
min<-min+temp
}
i<-i+1
}
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
boxplot(beta[min:temp1],horizontal=FALSE,show.names = FALSE,main=main,xlab="SAMPLES",ylab="Beta")
min<-min+temp
}
i<-i+1
}
dev.off()
colnames(beta)[1:5]
dim(beta)
colnames(beta)<-c("SEGID",seq(1,2661))
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[1]))+1
max<-max(which(site==names(table(site))[1]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
boxplot(beta[min:temp1],horizontal=FALSE,show.names = TRUE,main=main,xlab="SAMPLES",ylab="Beta")
min<-min+temp
}
i<-i+1
}
dev.off()
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[i]))+1
max<-max(which(site==names(table(site))[i]))+1
main<-names[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
boxplot(beta[min:temp1],horizontal=FALSE,show.names = TRUE,main=main,xlab="SAMPLES",ylab="Beta",ylim=c(0,1))
min<-min+temp
}
i<-i+1
}
dev.off()
table(site)
colnames(beta)<-c("SEGID",seq(1,2661))
sitenames<-c("BREAST","COLON","GLIOBLASTOMA","KIDNEY RENAL CLEAR","KIDNEY RENAL PAPILLARY","BLOOD LEUKEMIA","LUNG ADENOMA","LUNG SQUAMOUS","OVARY","RECTUM","STOMACH","UTERUS")
pdf("test_boxplot.pdf")
i<-1
while(i<=length(names))
{
min<-min(which(site==names(table(site))[i]))+1
max<-max(which(site==names(table(site))[i]))+1
main<-sitenames[i]
print(main)
while(min<max)
{
print(paste("min",min,sep=" "))
print(paste("max",max,sep=" "))
temp<-50
if(min+50 > max)
{
temp<-max-min
}
temp1<-min+temp
boxplot(beta[min:temp1],horizontal=FALSE,show.names = TRUE,main=main,xlab="SAMPLES",ylab="Beta",ylim=c(0,1))
min<-min+temp
}
i<-i+1
}
dev.off()
save.history("test_boxplot.R")
savehistory("test_boxplot.R")
